import {
    RectNode,
    RectNodeModel
} from "@logicflow/core";

class UserTaskModel extends RectNodeModel {
    initNodeData(data) {
        super.initNodeData(data);
        this.width = 80;
        this.height = 60;
        this.radius = 5;
    }
    getNodeStyle() {
        const style = super.getNodeStyle();
        const properties = this.properties;
        if (properties.statu === 'pass') {
            style.stroke = "green";
        } else if (properties.statu === 'reject') {
            style.stroke = "red";
        } else {
            style.stroke = "rgb(24, 125, 255)";
        }
        return style;
    }
}


class UserTaskView extends RectNode {

}
//自定义一个类型
export default {
    type: "UserTask",
    view: UserTaskView,
    model: UserTaskModel
};